package org.ctd.springframework.beans.factory.xml;

import com.ctd.springframework.core.io.Resource;
import org.ctd.springframework.beans.factory.parsing.ReaderContext;
import org.ctd.springframework.beans.factory.parsing.extractor.source.SourceExtractor;
import org.ctd.springframework.beans.factory.parsing.listener.reader.ReaderEventListener;
import org.ctd.springframework.beans.factory.parsing.reporter.ProblemReporter;
import org.ctd.springframework.beans.handler.namespace.NamespaceHandlerResolver;

/**
 * XmlReaderContext
 *
 * @author chentudong
 * @date 2019/3/26
 */
public class XmlReaderContext extends ReaderContext {
    private final XmlBeanDefinitionReader reader;

    private final NamespaceHandlerResolver namespaceHandlerResolver;

    public XmlReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener,
                            SourceExtractor sourceExtractor, XmlBeanDefinitionReader reader, NamespaceHandlerResolver namespaceHandlerResolver) {
        super(resource, problemReporter, eventListener, sourceExtractor);
        this.reader = reader;
        this.namespaceHandlerResolver = namespaceHandlerResolver;
    }

    public XmlBeanDefinitionReader getReader() {
        return reader;
    }

    public NamespaceHandlerResolver getNamespaceHandlerResolver() {
        return namespaceHandlerResolver;
    }
}
